import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-homepage',
  templateUrl: './homepage.component.html',
  styleUrls: ['./homepage.component.css']
})
export class HomepageComponent implements OnInit {

  menus=[
     {routePath:'/home/one',name:'oneMenu'},
     {routePath:'/home/two',name:'twoMenu'},
     {routePath:'/home/three',name:'threeMenu'},
     {routePath:'/home/four',name:'fourMenu'},
     {routePath:'/home/five',name:'fiveMenu'},
  ];

  constructor(private router:Router,private route:ActivatedRoute) { }

  ngOnInit() {
  }

  gotoMenu(r){                       
      this.router.navigate([r],{relativeTo:this.route});
  }

}
